#!/bin/bash

cur=`pwd`

sudo docker service create --name nginx-ser \
	--mount type=bind,source=/opt/data/todocker/logs/nginx,destination=/var/log/nginx \
	--mount type=bind,source=/opt/data/proj/snakyserver,destination=/opt/data/proj/apps/snakyserver \
	--mount type=bind,source=$cur/snaky.conf,destination=/etc/nginx/conf.d/default.conf \
	--mount type=bind,source=$cur/snaky-fileserver.conf,destination=/etc/nginx/conf.d/snaky-fileserver.conf \
	--mount type=bind,source=/etc/letsencrypt,destination=/etc/letencrypt \
	-p 80:80 \
	-p 8099:8099 \
	-p 8090:8090 \
	-p 443:443 \
	nginx:latest

